package aiku.numericalcontroloa.Model.Entity.OrderManagement;

import aiku.numericalcontroloa.Model.Entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @Author 黄广庭
 * @Date 2024/3/18 17:35
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "order_management")
public class Order extends BaseEntity implements Serializable {
    /**
     * 订单流水号
     */
    @TableField(value = "sn")
    private String sn;

    /**
     * 客户id
     */
    @TableField(value = "clients_id")
    private String clientsId;

    /**
     * 客户身份证号
     */
    @TableField(value = "clients_id_card")
    private String clientsIdCard;

    /**
     * 身份证复印件照片Url
     */
    @TableField(value = "copy_of_id_card")
    private String copyOfIdCard;

    /**
     * 业务员id
     */
    @TableField(value = "user_id")
    private String userId;

    /**
     * 售后员id
     */
    @TableField(value = "after_sale_id")
    private String afterSaleId;

    /**
     * 产品id
     */
    @TableField(value = "goods_id")
    private String goodsId;

    /**
     * 产品数量
     */
    @TableField(value = "goods_count")
    private Float goodsCount;

    /**
     * 总金额
     */
    @TableField(value = "transaction_amount")
    private BigDecimal transactionAmount;

    /**
     * 定金
     */
    @TableField(value = "deposit")
    private BigDecimal deposit;

    /**
     * 首付款
     */
    @TableField(value = "downPayment")
    private BigDecimal downPayment;

    /**
     * 交货时间
     */
    @TableField(value = "delivery_time")
    private LocalDate deliveryTime;

    /**
     * 订单类型
     */
    @TableField(value = "order_type")
    private Integer orderType;

    /**
     * 下单审核（0待审核，1通过，2驳回）
     */
    @TableField(value = "order_approval_flow_id")
    private String orderApprovalFlowId;

    /**
     * 收款审核
     */
    @TableField(value = "payment_approval_flow_id")
    private String paymentApprovalFlowId;

    /**
     * 付款方式，全款/分期
     */
    @TableField(value = "payment_method")
    private Integer paymentMethod;

    /**
     * 付款类型，先发后付/先付后发
     */
    @TableField(value = "payment_type")
    private Integer paymentType;

    /**
     * 订单状态（0未收款，1已收款，2欠款）
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 验收单Url
     */
    @TableField(value = "receipt")
    private String receipt;

    /**
     * 物流信息url
     */
    @TableField(value = "logistics_information")
    private String logisticsInformation;

    /**
     * 签订合同url
     */
    @TableField(value = "contract")
    private String contract;

    /**
     * 签订地点
     */
    @TableField(value = "place")
    private String place;

    /**
     * 还款截止时间
     */
    @TableField(value = "deadline")
    private LocalDate deadline;
}
